package com.ysyx.ysyx_census.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ysyx.ysyx_census.dto.BaseDto;
import com.ysyx.ysyx_census.pojo.OrderdetailPojo;
import com.ysyx.ysyx_census.service.OrderdetailPojoService;
import com.ysyx.ysyx_census.mapper.OrderdetailPojoMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class OrderdetailPojoServiceImpl
    implements OrderdetailPojoService{

    private OrderdetailPojoMapper orderdetailPojoMapper;
    @Override
    public BaseDto getOrderList() {
        QueryWrapper<OrderdetailPojo> orderdetailPojoQueryWrapper = new QueryWrapper<>();
        orderdetailPojoQueryWrapper.select("start_longitude","start_latitude");

        List<OrderdetailPojo> orderdetailPojos = orderdetailPojoMapper.selectList(orderdetailPojoQueryWrapper);
        System.err.println(orderdetailPojos);

        if (orderdetailPojos.size()==0){
            return new BaseDto(102,"轨迹点过期",null);
        }

        return new BaseDto(101,"轨迹点已获取",orderdetailPojos);
    }
}




